import 'package:flutter/material.dart';
import 'package:flutter_eve_plugin/constants/font_family.dart';
import 'package:flutter_eve_plugin/constants/font_weight.dart';
import 'package:flutter_eve_plugin/utils/image_util.dart';
import 'package:flutter_eve_plugin/utils/screen_util.dart';

class CheckpointSuccDescWidget extends StatelessWidget {
  const CheckpointSuccDescWidget({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.only(bottom: setRatio(18)),
      child: Stack(
        overflow: Overflow.visible,
        children: <Widget>[
          Container(
            width: setRatio(185),
            height: setRatio(21),
            decoration: BoxDecoration(
                color: Color(0x9F000000),
                borderRadius: BorderRadius.circular(setRatio(5))),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.start,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: <Widget>[
                SizedBox(
                  width: setRatio(17),
                ),
                RichText(
                  text: TextSpan(
                      style: TextStyle(
                          color: Color(0xFFFFFFFF),
                          fontFamily: FontFamily.PINGFANG,
                          fontWeight: FontWeightCustom.PF_Medium,
                          fontSize: setTextSp(12)),
                      children: [
                        TextSpan(text: '得分'),
                        TextSpan(
                            text: 'A级以上',
                            style: TextStyle(color: Color(0xFF908EFF))),
                        TextSpan(text: '的必得稀有奖励'),
                      ]),
                )
              ],
            ),
          ),
          Positioned(
            left: setRatio(-13),
            top: setRatio(-3),
            child: Image.asset(
              imageUtilYeXiu('checkpoint/icon_level_a@3x'),
              width: setRatio(30),
              height: setRatio(30),
            ),
          )
        ],
      ),
    );
  }
}
